<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>登陆</title>
		 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
         <meta name="apple-mobile-web-app-capable" content="yes">
         <meta content="yes" name="apple-touch-fullscreen">
         <meta name="apple-mobile-web-app-status-bar-style" content="black">  
         <script src="js/add_js.js"></script>
	</head>
    <body>
    	<div class="ball-pulse"><div></div><div></div><div></div></div>
    	<!--nav-->
        <nav class="bar bar-tab">
             <a class="tab-item external active" href="home.html">我的</a>
             <a class="tab-item external" href="order.html">定单</a>
             <a class="tab-item external" href="carRental.html">出租</a>
             <a class="tab-item external" href="rentalCar.html">租车</a>
             <div class="clear"></div>
        </nav>
       <!--nav-->
       <div class="page content">
       	<!--提现弹出-->
       	<div class="get-car-hold"></div>
       	<div class="get-cash">
       		<div class="get-cash-a"><span>余额</span><span>9410.0</span><div class="clear"></div></div>
       		<div class="get-cash-b"><span>提现到</span><span>招商银行储蓄卡</span><div class="clear"></div></div>
       		<input class="get-cash-c" type="text" placeholder="提现金额">
       		<input class="get-cash-c" type="password" placeholder="支付密码" >
       		<div class="get-cash-d"></div>
       		<div class="get-cash-e"><span>取消</span><span>确认</span><div class="clear"></div></div>
       	</div>
       	<!--提现弹出结束-->
        <div class="home-money">
        	<div class="home-money-main">
        		<div class="home-money-main-btn">
        			<a style="color:  #9E9E9E;float: right;" class="user_name"><img src="img/icon/yh.png"><label></label></a>
        			<a class="withdrawal_state">提现</a>
        			<a href="tradeDetails.html">交易明细</a>
        			<div class="clear"></div>
        		</div>
        		<div class="home-money-main-list">
        			<span class="home-money-main-list-left">余额(RMB)</span>
        			<span class="home-money-main-list-right balance">0</span>
        			<div class="clear"></div>
        		</div>
        		<div class="home-money-main-list">
        			<span class="home-money-main-list-left">总收益(RMB)</span>
        			<span class="home-money-main-list-right total_revenue">0</span>
        			<div class="clear"></div>
        		</div>
        		
        	</div>
        </div>
        <div class="home-list">
        	<ul>
        		 <li>
        			<div class="home-list-item identity_state">
        				<a href="checkOwner.html">
        					<span><img src='img/icon/no.png'><label></label></span>
        					<span>身份信息</span>
        				</a>
        			</div>
        		</li>
        		 <li>
        			<div class="home-list-item carmanage_state">
        				<a href="carManger.html">
        					<span><img src='img/icon/no.png'><label></label></span>
        					<span><!--审核中：1--></span>
        					<span><!--审核失败：1--></span>
        					<span>车辆管理</span>
        				</a>
        			</div>
        		 </li>
        		 <li>
        			<div class="home-list-item">
        				<a href="checkIdCard.html">
        					<span class="credit_state"><img src='img/icon/no.png'><label></label><!--信用卡--></span>
        					<span class="cashcard_state"><label></label><!--提现卡--></span>
        					<span>银行卡设置</span>
        				</a>
        			</div>
        		</li>
        		 <li>
        			<div class="home-list-item setpassword_state">
        				<a href="changePass.html">
        					<span><img src='img/icon/no.png'><label></label><!--交易密码提示--></span>
        					<span>密码设置</span>
        				</a>
        			</div>
        		</li>
        		 <li>
        			<div class="home-list-item coupons_state">
        				<a href="">
        					<span><!--10张未使用--></span>
        					<span>优惠信息</span>
        				</a>
        			</div>
        		</li>
        		 <li>
        			<div class="home-list-item"><a href=""><span>帮助中心</span></a></div>
        		</li>
        		 <li>
        			<div class="home-list-item about_our" style="border-bottom: solid thin #ccc;"><a href=""><span><!--400-1189-9877--></span><span>联系我们</span></a></div>
        		</li>
        		
        	</ul>
        </div>
      	    <script>
      	    $(document).ready(function(){
      	       if(my.checkLogin()){
      	    	  $('.ball-pulse').fadeOut()
      	    	  $.showIndicator()
      	    	  my.scollToggleBar()
      	    	  $('.bar-tab').css('display','block')
      	          key=my.get_key(my.getCookie('token'))
      	          var info={'u_userid':my.getCookie('id')}
    				  info=JSON.stringify(info)
                      info=my.cryptoASEencrypt(info,key).toString()
      	              $.ajax({
      						type:"post",
      						url:"http://192.168.1.10:8082/index.php?r=userabout%2Fuser%2Fuseraccountinfo",
      						data:{
      							'api_value':info
      						},
      						async:true,
      						error:function(){
      							$.hideIndicator()
      							$.toast("请求失败，请刷新重试");
      						},
      						success:function(data){
      							if(data.match("err_code")!=null){
      								$.hideIndicator()
      								switch(JSON.parse(data).err_code)
      								{
      									case 40003:
      									   my.tokenExpire()
      									   break;
      									default:
      									   $.toast(JSON.parse(data).err_msg);
      									   
      								}
                                         
      							}else{
      								    
      								    data=JSON.parse(my.cryptoASEdencrypt(data,key))
      								    $('.balance').text(data.balance)
      								    $('.total_revenue').text(data.total_revenue)
      								    if(data.withdrawal_state==0){
      								    	$('.withdrawal_state').attr('href','')
      								    }
      								    $('.user_name label').text(data.user_name)
      								    if(data.identity_state==1){
      								    	$('.identity_state img').attr('src','img/icon/ok.png')
      								    	$('.identity_state span:first-child label').text(data.identity_statedoc)
      								    }else if(data.identity_state==0){
      								    	$('.identity_state img').attr('src','img/icon/no.png')
      								    	$('.identity_state span:first-child label').text(data.identity_statedoc)
      								    }
      								    if(data.carmanage_state==1){
      								    	$('.carmanage_state img').attr('src','img/icon/ok.png')
      								    	$('.carmanage_state span:first-child label').text(data.carmanage_doc.doc_one+" : "+data.carmanage_doc.count_one)
      								    	$('.carmanage_state span:eq(1)').text(data.carmanage_doc.doc_two+" : "+data.carmanage_doc.count_two)
      								    	$('.carmanage_state span:eq(2)').text(data.carmanage_doc.doc_thr+" : "+data.carmanage_doc.count_thr)
      								    }else{
      								    	$('.carmanage_state img').attr('src','img/icon/no.png')
      								    	$('.carmanage_state span:first-child label').text(data.carmanage_doc)
      								    }
      								    if(data.credit_state==1){
      								    	$('.credit_state img').attr('src','img/icon/ok.png')
      								    }
      								    $('.credit_state label').text(data.credit_doc)
      								    $('.cashcard_state label').text(data.cashcard_doc)
      								    if(data.setpassword_state==1){
      								    	$('.setpassword_state img').attr('src','img/icon/ok.png')
      								    }else if(data.setpassword_state==0){
      								    	$('.setpassword_state img').attr('src','img/icon/no.png')
      								    	$('.setpassword_state span:first-child label').text(data.setpassword_doc)
      								    }
      								    if(data.coupons_state==1){
      								    	$('.coupons_state span:first-child').text(data.coupons_doc)
      								    }
      								    $('.about_our span:first-child').text(data.about_our.telephone)
      								    $.hideIndicator()
      							}
      						},
      				});
      				//提现操作
      				$('.withdrawal_state').click(function(){
      					$('.get-car-hold').show();
      					$('.get-cash').show();
      				})
      				$('.get-car-hold').click(function(){
      					$('.get-cash').hide();
      					$(this).hide()
      				})
      			}//判断登陆结束
      		})
      	    </script>
      	</div>
	</body>
</html>